Getting Started with Arduino Wiring for Windows 10 IoT Core by Agus Kurniawan

Getting Started with Arduino Wiring for Windows 10 IoT Core by Agus Kurniawan

Author:Agus Kurniawan [Kurniawan, Agus]
Language: eng
Format: epub, azw3, pdf
Publisher: PE Press
Published: 2016-01-22T23:00:00+00:00


3.2 Demo Serial Communication

For demo, I use a program from section 2.2. We add messages using Log() so we can monitor these message on Output window.

Create Arduino Wiring project, called SerialDemo. See section 2.2.2.1. Then, write this code on SerialDemo.ino.

void setup() { pinMode(GPIO13, OUTPUT); pinMode(GPIO6, OUTPUT); pinMode(GPIO5, OUTPUT); } void loop() { Log(L"LED 1 ON \n"); digitalWrite(GPIO13, HIGH); digitalWrite(GPIO6, LOW); digitalWrite(GPIO5, LOW); delay(500); Log(L"LED 2 ON \n"); digitalWrite(GPIO13, LOW); digitalWrite(GPIO6, HIGH); digitalWrite(GPIO5, LOW); delay(500); Log(L"LED 3 ON \n"); digitalWrite(GPIO13, LOW); digitalWrite(GPIO6, LOW); digitalWrite(GPIO5, HIGH); delay(500); }



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.